package com.cwd.arm.common.enums;

/**
 * Created by yan on 21-11-28.
 */
public enum HonorPayTypeEnum {

    BANK("BANK", "银行承兑"),
    GOODWILL("GOODWILL", "商誉"),
    HONOR_OTHER("HONOR_OTHER", "其他");


    String code; // 状态编号
    String name; //状态名称

    HonorPayTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getName(String code) {
        for (HonorPayTypeEnum honorPayTypeEnum : HonorPayTypeEnum.values()) {
            if (honorPayTypeEnum.getCode().equals(code)) {
                return honorPayTypeEnum.getName();
            }
        }
        return null;
    }
}
